package cm.tl.pms.sys.pojo;

import cm.tl.pms.sys.desensitization.Desensitization;
import cm.tl.pms.sys.desensitization.DesensitizationTypeEnum;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @author lwp
 * @create 2024-11-29-11:09
 */
@Data
public class LoginPhoneDto {
    @NotBlank(message = "手机号不能为空！")
    private String phone;
    @NotBlank(message = "密码不能为空！")
    /**
     * 因为密码比较重要，故仅用于反序列化
     */
    @Desensitization(type = DesensitizationTypeEnum.PASSWORD)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;
}
